using System;
using System.Collections.Generic;
using System.Web.Mvc;
using MvcContrib.FluentHtml;
using MvcContrib.FluentHtml.Behaviors;

namespace FwkLight.Web.MVC
{
  public class BasePartialViewBase : ViewUserControl
  {
    
  }

  public class BasePartialView<T> : BasePartialViewBase, IViewModelContainer<T> where T : class
  {
    protected ViewDataDictionary internalViewData
    {
      get { return base.ViewData; }
    }

    public new ViewDataDictionary<T> ViewData
    {
      get
      {
        throw new NotImplementedException();
      }
    }

    public new T Model
    {
      get
      {
        return base.ViewData.Model as T;
      }
    }

    public ModelStateDictionary ModelState
    {
      get
      {
        return base.ViewData.ModelState;
      }
    }

    public T ViewModel
    {
      get { return Model; }
    }

    public IEnumerable<IBehaviorMarker> Behaviors
    {
      get { return new List<IBehaviorMarker>(); }
    }

    public virtual string HtmlNamePrefix
    {
      get { return ""; }
      set { }
    }
  }
}